﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="ListUsers.aspx.cs" Inherits="NhanAi.Admin.ListUsers" %>

<%@ Register Src="~/Admin/PagingBar.ascx" TagName="PagingBar" TagPrefix="uc2" %>
<%@ Import Namespace="NhanAi.App_Code" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <form id="form" action="ListUsers.aspx" method="post">
        <table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
            <tr>
                <th class="table-header-check">
                    <input type="checkbox" id="check-all" />
                </th>
                <th class="table-header-repeat line-left">
                    <a href="">Tên người dùng</a>
                </th>
                <th class="table-header-repeat line-left">
                    <a href="">Email</a>
                </th>
                 <th class="table-header-repeat line-left">
                    <a href="">Tên đăng nhập</a>
                </th>
                <th class="table-header-repeat line-left">
                    <a href="">Vai trò</a>
                </th>
                  <th class="table-header-repeat line-left">
                    <a href="">Trạng thái</a>
                </th>
                <th class="table-header-options line-left"></th>
            </tr>

            <asp:Repeater ID="rptData" runat="server">
                <ItemTemplate>
                    <tr>
                        <td>
                            <input type="checkbox" id='ids<%#Eval("Id")%>' value="<%#Eval("Id")%>" name="ids" />
                        </td>

                        <td>
                            <%# Eval("Nicename") %>
                        </td>
                        <td>
                            <%# Eval("Email")%>
                        </td>
                        <td>
                            <%#Eval("UserLogin") %>
                        </td>
                        <td>                           
                            <%# (int)Eval("UserRole")==7?"admin":((int)Eval("UserRole")==NAConstants.ROLE_AUTHOR?"editor":((int)Eval("UserRole")==NAConstants.ROLE_USER?"user":"follower")) %>
                        </td>
                        <td>
                            <%# (int)Eval("Status")==1?"Đã kích hoạt":"Chưa kích hoạt"%>
                        </td>
                        <td>
                            
                            <a href="/Admin/EditUser.aspx?id=<%#Eval("Id") %>">Chỉnh sửa</a>

                        </td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>

        </table>
    </form>
    <%if(CurrentUser.UserRole==7){ %>
    <uc2:PagingBar ID="paging" runat="server"></uc2:PagingBar>
    <%} %>
</asp:Content>
